export class Timer {
    constructor(process, interval) {
        this.process = process;
        this.interval = interval;
    }

    start() {
        this.stop();
        this.timer = setInterval(this.process, this.interval);
    }

    stop() {
        clearInterval(this.timer);
    }
}
